﻿<!--
Project: ClipFlair (http://ClipFlair.codeplex.com)
Filename: ActivityWindow.xaml
Version: 20150204
-->

<clipflair:BaseWindow x:Class="ClipFlair.Windows.ActivityWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:clipflair="clr-namespace:ClipFlair.Windows;assembly=ClipFlair.Windows.Base"
  xmlns:utils="clr-namespace:System.Windows.Controls;assembly=Compatibility"
  xmlns:options="clr-namespace:ClipFlair.Windows.Options"                                            
  xmlns:local="clr-namespace:ClipFlair.Windows"
  mc:Ignorable="d"
                    
  ShowScreenshotButton="False"
  
  SizeChanged="BaseWindow_SizeChanged"
                      
  d:DesignWidth="1000" d:DesignHeight="700"
  > <!-- hiding screenshot button due to Silverlight security issue: not rendering cross-domain content to WriteableBitmap -->
  
  
  <!-- #region Resources -->
  
  <clipflair:BaseWindow.Resources>
    <ResourceDictionary>
      
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ClipFlair.Windows.Base;component/Themes/Generic.xaml" />
      </ResourceDictionary.MergedDictionaries>

      <utils:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
      
    </ResourceDictionary>
  </clipflair:BaseWindow.Resources>

  <!-- #endregion -->
  
  <!-- #region Front -->
  
  <!--<clipflair:BaseWindow.FrontContent>-->

  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>

    <local:ActivityContainer x:Name="activity"
      Grid.Row="0" Grid.Column="0"
      LoadURLClick="activity_LoadURLClick"
      LoadClick="activity_LoadClick"
      SaveClick="activity_SaveClick"
      />
      <!-- don't bind any properties of ActivityContainer to our view, since ActivityWindow reuses the view of ActivityContainer -->

    <!-- Install -->
    <Label
      Name="lblInstall" 
      Grid.Row="0" Grid.Column="0" 
      HorizontalAlignment="Right" VerticalAlignment="Bottom" 
      Margin="0,0,40,1"
      FontWeight="ExtraBold" 
      FontStretch="UltraExpanded"
      Foreground="#909A15"
      Content="install"
      Cursor="Hand"
      MouseLeftButtonDown="lblInstall_MouseLeftButtonDown"
      ToolTipService.ToolTip="Install for Out-Of-Browser (OOB) use"
      Visibility="{Binding IsShowingInstall, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ActivityWindow}, Converter={StaticResource BooleanToVisibilityConverter}}"
      />

  </Grid>

  <!--</clipflair:BaseWindow.FrontContent>-->
  
  <!-- #endregion -->
  
  <!-- #region Back -->

  <clipflair:BaseWindow.PropertyItems>

    <options:ActivityOptions x:Name="activityOptions" DataContext="{Binding}" /> <!-- uses our DataContext (the View) -->

  </clipflair:BaseWindow.PropertyItems>
  
  <!-- #endregion -->

</clipflair:BaseWindow>
